Call the destroy vfunc before clearing
frame clock and gl context, so backends
have a chance to clean up.
display = gdk_surface_get_display (surface);
+ GDK_SURFACE_GET_CLASS (surface)->destroy (surface, foreign_destroy);
+
if (surface->gl_paint_context)
{
/* Make sure to destroy if current */
_gdk_surface_clear_update_area (surface);
- GDK_SURFACE_GET_CLASS (surface)->destroy (surface, foreign_destroy);
-
surface->state |= GDK_SURFACE_STATE_WITHDRAWN;
surface->destroyed = TRUE;